/*
 * @(#)MaintStaffHierarchyAction.java
 *
 * Copyright (c) 2003 DCIVision Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of DCIVision
 * Ltd ("Confidential Information").  You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of the license
 * agreement you entered into with DCIVision Ltd.
 */
package com.dcivision.staff.web;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionMapping;

import com.dcivision.framework.ApplicationException;
import com.dcivision.framework.SystemFunctionConstant;
import com.dcivision.framework.web.AbstractActionForm;
import com.dcivision.framework.web.AbstractMaintAction;

/**
  MaintStaffHierarchyAction.java

  This class is for maint staff hierarchy.

    @author          Wong Yam Lee
    @company         DCIVision Limited
    @creation date   28/07/2003
    @version         $Revision: 1.5 $
*/

public class MaintStaffHierarchyAction extends AbstractMaintAction {

  public static final String REVISION = "$Revision: 1.5 $";

  public MaintStaffHierarchyAction() {
    super();
  }

  /**
   * getMajorDAOClassName
   *
   * @return  The class name of the major DAObject will be used in this action.
   */
  public String getMajorDAOClassName() {
    return("com.dcivision.staff.dao.StaffHierarchyDAObject");
  }

  /**
   * getFunctionCode
   *
   * @return  The corresponding system function code of action.
   */
  public String getFunctionCode() {
    return(SystemFunctionConstant.STAFF_HIERARCHY);
  }

  /**
   * clearUniqueFields
   *
   * @param mapping
   * @param form
   * @param request
   * @param response
   * @throws ApplicationException
   */
  public void clearUniqueFields(ActionMapping mapping, AbstractActionForm form, HttpServletRequest request, HttpServletResponse response) throws ApplicationException {
    MaintStaffHierarchyForm staffHierarchyForm = (MaintStaffHierarchyForm)form;
    staffHierarchyForm.setName(null);
  }
}
